<?php
/**
 * common repository file Created by PhpStorm.
 * User: wumengmeng
 * Date: 2020/05/11
 * Time: 16:24
 */
 
 namespace HiCommon\Repository;

use HiCommon\Model\Handbook;

class HandbookRepository extends BaseRepository
{
    public function base_model(){
        return new \HiCommon\Model\Handbook();
    }

    public function delete($n_id, bool $bool = false)
    {
        if ($bool === true) {
            //物理删除
            return Handbook::where('id', $n_id)->first()->forceDelete();
        }
        else {
            //软删除
            return Handbook::where('id', $n_id)->first()->delete();
        }
    }
}